package TestsBuxfer;

import Factory.PropertyLoader;
import WebDriverPackage.WebDriverFactory;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;

import java.util.concurrent.TimeUnit;

/**
 * Created with IntelliJ IDEA.
 * User: Sergey Spasichenko
 * Date: 7/15/13
 * Time: 2:00 AM
 * To change this template use File | Settings | File Templates.
 */
public class BasicTest {
    protected WebDriver driver;
    @BeforeSuite

    public void iniDriver(){
        //driver = new ChromeDriver();
        //driver = new FirefoxDriver();
        //driver = new InternetExplorerDriver();
        //driver.manage().timeouts().implicitlyWait(25, TimeUnit.SECONDS);

        String browserName = PropertyLoader.loadProperty("browser.name");
        driver = WebDriverFactory.createDriver(browserName);
        driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
        }

    @AfterSuite
    public void destruct(){
        driver.quit();
    }
}


